package gui;

import java.net.URL;

import javax.swing.ImageIcon;

public class Util {

  public static ImageIcon getImage(String relativePath) {
    URL imgURL = UserControls.class.getResource(relativePath);
    if (imgURL != null) {
      return new ImageIcon(imgURL);
    }
    else {
      System.err.println("Could not find image: "+relativePath);
      return null;
    }
  }
}